﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Windows.Forms;

namespace hpm
{
    class clsPhongKham
    {
        string _maPhongKham, _tenPhongKham;
        DAL da = new DAL();
        public DataTable dtbKhoa;
        SqlCommand slqcom;
        SqlDataAdapter sqlDataAdapter = null;

        public string MaPhongKham
        { get; set; }

        public string TenPhongKham
        { get; set; }

        public DataTable GetAllPhongKham()
        {
            da.ketnoiServer();
            dtbKhoa = new DataTable();
            this.slqcom = new SqlCommand();
            this.slqcom.CommandText = "Select * from DMPhongKham";
            this.slqcom.Connection = da.con;
            this.slqcom.CommandType = CommandType.Text;
            this.sqlDataAdapter = new SqlDataAdapter(this.slqcom);
            this.sqlDataAdapter.Fill(dtbKhoa);
            da.da_closeConnect();
            return dtbKhoa;
        }


    }
}
